#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#define REP(i,n) for(int i = 0 ;i<int(n);++i)
using namespace std;

int a[100100],ap[100100],lcnt[100100];

bool cmp(int pa,int pb)
{
    return a[pa]<=a[pb];
}
int main()
{
    int n;
    cin>>n;
    REP(i,n) cin>>a[i],ap[i] = i,lcnt[i]=-1;
    sort(ap,ap+n,cmp);
    int tmax = -1;
    REP(i,n)
    {
        if(ap[i]<tmax) lcnt[ap[i]] = tmax - ap[i] - 1;
        else lcnt[ap[i]] = -1;
        if(tmax==-1||a[ap[i]]!=a[ap[i-1]])tmax = max(tmax,ap[i]);
    }
    REP(i,n) cout<<lcnt[i]<<" ";
    cout<<endl;
	return 0;
}
